<?php
declare(strict_types=1);
// 用户订单
namespace app\tjy_v1\controller;

use app\tjy_v1\model\User as MYSQL; //导入模型

class Order
{
    // 一条订单详情
    public function id()
    {
        $query = request()->param(); //请求参数

        // order_sn//订单编号
        $apidb = [
            'code' => 200,
            'time' => time(),
            'msg' => "一条订单详情",
            'query' => $query,
            'db' => [
                "basic" => [
                    "type" => "basic",
                    "data" => [
                        "field" => [
                            "order_status" => "reserve",
                            "order_sn" => "G10759240406201922",
                            "goods_amount" => "88.00",
                            "order_amount" => "88.00",
                            "order_time" => "2024-04-06 20:19:22",
                            "buyer_remark" => "",
                            "seller_remark" => null,
                            "pay_time" => null,
                            "shipping_time" => null,
                            "cancel_time" => null,
                            "refund_time" => null,
                            "complete_time" => null
                        ]
                    ]
                ],
                "status" => ["type" => "status", "data" => ["field" => ["text" => "预约中", "note" => "", "code" => "reserve"], "style" => ["color" => "#333333", "background" => "#e93323"]]],
                "goods" => ["type" => "goods", "data" => ["list" => [["goods_price" => "88.00", "goods_number" => "1", "integral" => 0, "goods_name" => "333两件套套装裙连衣裙春季女装新款内搭套头针织衫毛衣中长款打底裙", "goods_image" => "https://img14.360buyimg.com/n1/s800x800_jfs/t1/139220/40/17156/149715/5fcd845dEd0b7fa22/d5d02cb4d8e3d134.jpg", "goods_sku_text" => "标准", "is_comment" => 0, "order_sn" => "G10759240406201922", "goods_amount" => "88.00", "refund_status" => 0, "goods_id" => "333", "goods_sku_key" => "", "operation" => []]]]],
                "countdown" => ["type" => "countdown", "data" => ["field" => []]],
                "address" => ["type" => "address", "data" => ["icon" => "", "field" => ["contact" => "d", "contact_number" => "13800138000", "gender" => 1, "province" => "120000", "city" => "", "district" => "", "address" => "ASd", "house_number" => "ads", "longitude" => "", "latitude" => "", "province_name" => "天津市", "city_name" => null, "district_name" => null, "street_name" => null, "full_address" => "天津市ASdads"]]],
                "logistics" => [
                    "type" => "logistics",
                    "show" => 0,
                    "data" => [
                        "field" => [
                            "text" => "暂无记录",
                            "time" => "2021-09-22 19:22:27"
                        ]
                    ]
                ],
                "charges" => ["type" => "charges", "data" => ["list" => [["label" => "商品总额", "text" => "¥88.00", "highlight" => 0], ["label" => "运费", "text" => "+¥0.00", "highlight" => 0], ["label" => "优惠券", "text" => "-¥0.00", "highlight" => 0], ["label" => "积分抵扣", "text" => "-¥0.00", "highlight" => 0], ["label" => "实付款", "text" => "¥88.00", "highlight" => 1]]]],
                //    订单详情底部按钮
                "operation" => [
                    "type" => "operation",
                    "note" => "注意:当前订单正在配送中...",//备注
                    "data" => [
                        "list" => [
                            ["label" => "支付订单", "code" => "payment"],
                            ["label" => "查看物流", "code" => "logistics"],
                            ["label" => "删除订单", "code" => "delete", "color" => "#F30", "border" => "#F30", "background" => "#FFF"],
                            ["label" => "取消订单", "code" => "cancel", "color" => "#F30", "border" => "#F30", "background" => "#FFF"],
                        ]
                    ]
                ],
                "info" => [
                    "type" => "info",
                    "data" => [
                        "list" => [
                            ["label" => "订单编号", "text" => "G10759240406201922", "highlight" => 0, "copy" => 0],
                            ["label" => "下单时间", "text" => "2024-04-06 20:19:22", "highlight" => 0, "copy" => 0],
                            ["label" => "取消时间", "text" => "", "highlight" => 0, "copy" => 0],
                            ["label" => "用户备注", "text" => "", "highlight" => 0, "copy" => 0],
                            ["label" => "支付方式", "text" => "线下支付"],
                            ["label" => "支付流水", "text" => ""]
                        ]
                    ]
                ]
            ],
        ];
        return json($apidb);


    }

    // 订单列表
    public function List()
    {
        $query = request()->param(); //请求参数
        $apidb = [
            'code' => 200,
            'time' => time(),
            'msg' => "订单列表",
            'query' => $query,
            'db' => [
                "total" => 10,
                "list" => [
                    ["basic" => ["type" => "basic", "data" => ["field" => ["order_sn" => "G10759240406201922", "goods_amount" => "88.00", "order_amount" => "88.00", "order_time" => "2024-04-06 20:19:22", "buyer_remark" => "", "seller_remark" => null, "pay_time" => null, "shipping_time" => null, "cancel_time" => null, "refund_time" => null, "complete_time" => null]]], "status" => ["type" => "status", "data" => ["field" => ["text" => "交易完成", "note" => ""], "style" => ["color" => "#333333", "background" => "#e93323"]]], "goods" => ["type" => "status", "data" => ["list" => [["goods_id" => "333", "goods_price" => "88.00", "goods_number" => "1", "integral" => "0", "is_comment" => "0", "order_sn" => "G10759240406201922", "goods_amount" => "88.00", "refund_status" => "0", "goods_name" => "333两件套套装裙连衣裙春季女装新款内搭套头针织衫毛衣中长款打底裙", "goods_image" => "https://img14.360buyimg.com/n1/s800x800_jfs/t1/139220/40/17156/149715/5fcd845dEd0b7fa22/d5d02cb4d8e3d134.jpg"]]]], "operation" => ["type" => "operation", "data" => ["list" => [["label" => "查看物流", "code" => "logistics"]]]]],
                    ["basic" => ["type" => "basic", "data" => ["field" => ["order_sn" => "G9759240403235803", "goods_amount" => "77.00", "order_amount" => "77.00", "order_time" => "2024-04-03 23:58:03", "buyer_remark" => "", "seller_remark" => null, "pay_time" => null, "shipping_time" => null, "cancel_time" => null, "refund_time" => null, "complete_time" => null]]], "status" => ["type" => "status", "data" => ["field" => ["text" => "交易完成", "note" => ""], "style" => ["color" => "#333333", "background" => "#e93323"]]], "goods" => ["type" => "status", "data" => ["list" => [["goods_id" => "222", "goods_price" => "77.00", "goods_number" => "1", "integral" => "0", "is_comment" => "0", "order_sn" => "G9759240403235803", "goods_amount" => "77.00", "refund_status" => "0", "goods_name" => "222两件套套装裙连衣裙春季女装新款内搭套头针织衫毛衣中长款打底裙", "goods_image" => "https://img14.360buyimg.com/n1/s800x800_jfs/t1/139220/40/17156/149715/5fcd845dEd0b7fa22/d5d02cb4d8e3d134.jpg"]]]], "operation" => ["type" => "operation", "data" => ["list" => [["label" => "查看物流", "code" => "logistics"]]]]],
                    ["basic" => ["type" => "basic", "data" => ["field" => ["order_sn" => "G8759220508232757", "goods_amount" => "77.00", "order_amount" => "77.00", "order_time" => "2022-05-08 23:27:57", "buyer_remark" => "", "seller_remark" => null, "pay_time" => null, "shipping_time" => null, "cancel_time" => null, "refund_time" => null, "complete_time" => null]]], "status" => ["type" => "status", "data" => ["field" => ["text" => "交易完成", "note" => ""], "style" => ["color" => "#333333", "background" => "#e93323"]]], "goods" => ["type" => "status", "data" => ["list" => [["goods_id" => "222", "goods_price" => "77.00", "goods_number" => "1", "integral" => "0", "is_comment" => "0", "order_sn" => "G8759220508232757", "goods_amount" => "77.00", "refund_status" => "0", "goods_name" => "222两件套套装裙连衣裙春季女装新款内搭套头针织衫毛衣中长款打底裙", "goods_image" => "https://img14.360buyimg.com/n1/s800x800_jfs/t1/139220/40/17156/149715/5fcd845dEd0b7fa22/d5d02cb4d8e3d134.jpg"]]]], "operation" => ["type" => "operation", "data" => ["list" => [["label" => "查看物流", "code" => "logistics"]]]]],
                    ["basic" => ["type" => "basic", "data" => ["field" => ["order_sn" => "G7759220508232139", "goods_amount" => "77.00", "order_amount" => "77.00", "order_time" => "2022-05-08 23:21:39", "buyer_remark" => "", "seller_remark" => null, "pay_time" => null, "shipping_time" => null, "cancel_time" => null, "refund_time" => null, "complete_time" => null]]], "status" => ["type" => "status", "data" => ["field" => ["text" => "交易完成", "note" => ""], "style" => ["color" => "#333333", "background" => "#e93323"]]], "goods" => ["type" => "status", "data" => ["list" => [["goods_id" => "222", "goods_price" => "77.00", "goods_number" => "1", "integral" => "0", "is_comment" => "0", "order_sn" => "G7759220508232139", "goods_amount" => "77.00", "refund_status" => "0", "goods_name" => "222两件套套装裙连衣裙春季女装新款内搭套头针织衫毛衣中长款打底裙", "goods_image" => "https://img14.360buyimg.com/n1/s800x800_jfs/t1/139220/40/17156/149715/5fcd845dEd0b7fa22/d5d02cb4d8e3d134.jpg"]]]], "operation" => ["type" => "operation", "data" => ["list" => [["label" => "查看物流", "code" => "logistics"]]]]],
                    ["basic" => ["type" => "basic", "data" => ["field" => ["order_sn" => "G6759211130151629", "goods_amount" => "77.00", "order_amount" => "77.00", "order_time" => "2021-11-30 15:16:29", "buyer_remark" => "", "seller_remark" => null, "pay_time" => null, "shipping_time" => null, "cancel_time" => null, "refund_time" => null, "complete_time" => null]]], "status" => ["type" => "status", "data" => ["field" => ["text" => "交易完成", "note" => ""], "style" => ["color" => "#333333", "background" => "#e93323"]]], "goods" => ["type" => "status", "data" => ["list" => [["goods_id" => "222", "goods_price" => "77.00", "goods_number" => "1", "integral" => "0", "is_comment" => "0", "order_sn" => "G6759211130151629", "goods_amount" => "77.00", "refund_status" => "0", "goods_name" => "222两件套套装裙连衣裙春季女装新款内搭套头针织衫毛衣中长款打底裙", "goods_image" => "https://img14.360buyimg.com/n1/s800x800_jfs/t1/139220/40/17156/149715/5fcd845dEd0b7fa22/d5d02cb4d8e3d134.jpg"]]]], "operation" => ["type" => "operation", "data" => ["list" => [["label" => "查看物流", "code" => "logistics"]]]]],
                    ["basic" => ["type" => "basic", "data" => ["field" => ["order_sn" => "G5759211020105650", "goods_amount" => "88.00", "order_amount" => "88.00", "order_time" => "2021-10-20 10:56:50", "buyer_remark" => "", "seller_remark" => null, "pay_time" => null, "shipping_time" => null, "cancel_time" => null, "refund_time" => null, "complete_time" => null]]], "status" => ["type" => "status", "data" => ["field" => ["text" => "交易完成", "note" => ""], "style" => ["color" => "#333333", "background" => "#e93323"]]], "goods" => ["type" => "status", "data" => ["list" => [["goods_id" => "333", "goods_price" => "88.00", "goods_number" => "1", "integral" => "0", "is_comment" => "0", "order_sn" => "G5759211020105650", "goods_amount" => "88.00", "refund_status" => "0", "goods_name" => "333两件套套装裙连衣裙春季女装新款内搭套头针织衫毛衣中长款打底裙", "goods_image" => "https://img14.360buyimg.com/n1/s800x800_jfs/t1/139220/40/17156/149715/5fcd845dEd0b7fa22/d5d02cb4d8e3d134.jpg"]]]], "operation" => ["type" => "operation", "data" => ["list" => [["label" => "查看物流", "code" => "logistics"]]]]],
                    ["basic" => ["type" => "basic", "data" => ["field" => ["order_sn" => "G4759211019100927", "goods_amount" => "66.00", "order_amount" => "66.00", "order_time" => "2021-10-19 10:09:27", "buyer_remark" => "jjjj", "seller_remark" => null, "pay_time" => null, "shipping_time" => null, "cancel_time" => null, "refund_time" => null, "complete_time" => null]]], "status" => ["type" => "status", "data" => ["field" => ["text" => "交易完成", "note" => ""], "style" => ["color" => "#333333", "background" => "#e93323"]]], "goods" => ["type" => "status", "data" => ["list" => [["goods_id" => "111", "goods_price" => "66.00", "goods_number" => "1", "integral" => "0", "is_comment" => "0", "order_sn" => "G4759211019100927", "goods_amount" => "66.00", "refund_status" => "0", "goods_name" => "111两件套套装裙连衣裙春季女装新款内搭套头针织衫毛衣中长款打底裙", "goods_image" => "https://img14.360buyimg.com/n1/s800x800_jfs/t1/139220/40/17156/149715/5fcd845dEd0b7fa22/d5d02cb4d8e3d134.jpg"]]]], "operation" => ["type" => "operation", "data" => ["list" => [["label" => "查看物流", "code" => "logistics"]]]]],
                    ["basic" => ["type" => "basic", "data" => ["field" => ["order_sn" => "G3759211019100741", "goods_amount" => "77.00", "order_amount" => "77.00", "order_time" => "2021-10-19 10:07:41", "buyer_remark" => "", "seller_remark" => null, "pay_time" => null, "shipping_time" => null, "cancel_time" => null, "refund_time" => null, "complete_time" => null]]], "status" => ["type" => "status", "data" => ["field" => ["text" => "交易完成", "note" => ""], "style" => ["color" => "#333333", "background" => "#e93323"]]], "goods" => ["type" => "status", "data" => ["list" => [["goods_id" => "222", "goods_price" => "77.00", "goods_number" => "1", "integral" => "0", "is_comment" => "0", "order_sn" => "G3759211019100741", "goods_amount" => "77.00", "refund_status" => "0", "goods_name" => "222两件套套装裙连衣裙春季女装新款内搭套头针织衫毛衣中长款打底裙", "goods_image" => "https://img14.360buyimg.com/n1/s800x800_jfs/t1/139220/40/17156/149715/5fcd845dEd0b7fa22/d5d02cb4d8e3d134.jpg"]]]], "operation" => ["type" => "operation", "data" => ["list" => [["label" => "查看物流", "code" => "logistics"]]]]],
                    ["basic" => ["type" => "basic", "data" => ["field" => ["order_sn" => "G2759211018212027", "goods_amount" => "88.00", "order_amount" => "176.00", "order_time" => "2021-10-18 21:20:27", "buyer_remark" => "", "seller_remark" => null, "pay_time" => null, "shipping_time" => null, "cancel_time" => null, "refund_time" => null, "complete_time" => null]]], "status" => ["type" => "status", "data" => ["field" => ["text" => "交易完成", "note" => ""], "style" => ["color" => "#333333", "background" => "#e93323"]]], "goods" => ["type" => "status", "data" => ["list" => [["goods_id" => "333", "goods_price" => "88.00", "goods_number" => "2", "integral" => "0", "is_comment" => "0", "order_sn" => "G2759211018212027", "goods_amount" => "88.00", "refund_status" => "0", "goods_name" => "333两件套套装裙连衣裙春季女装新款内搭套头针织衫毛衣中长款打底裙", "goods_image" => "https://img14.360buyimg.com/n1/s800x800_jfs/t1/139220/40/17156/149715/5fcd845dEd0b7fa22/d5d02cb4d8e3d134.jpg"]]]], "operation" => ["type" => "operation", "data" => ["list" => [["label" => "查看物流", "code" => "logistics"]]]]],
                    ["basic" => ["type" => "basic", "data" => ["field" => ["order_sn" => "G1759211018210959", "goods_amount" => "88.00", "order_amount" => "88.00", "order_time" => "2021-10-18 21:09:59", "buyer_remark" => "", "seller_remark" => null, "pay_time" => null, "shipping_time" => null, "cancel_time" => null, "refund_time" => null, "complete_time" => null]]], "status" => ["type" => "status", "data" => ["field" => ["text" => "交易完成", "note" => ""], "style" => ["color" => "#333333", "background" => "#e93323"]]], "goods" => ["type" => "status", "data" => ["list" => [["goods_id" => "333", "goods_price" => "88.00", "goods_number" => "1", "integral" => "0", "is_comment" => "0", "order_sn" => "G1759211018210959", "goods_amount" => "88.00", "refund_status" => "0", "goods_name" => "333两件套套装裙连衣裙春季女装新款内搭套头针织衫毛衣中长款打底裙", "goods_image" => "https://img14.360buyimg.com/n1/s800x800_jfs/t1/139220/40/17156/149715/5fcd845dEd0b7fa22/d5d02cb4d8e3d134.jpg"]]]], "operation" => ["type" => "operation", "data" => ["list" => [["label" => "查看物流", "code" => "logistics"]]]]]
                ]
            ],
        ];
        return json($apidb);
    }

    // 订单物流信息
    public function logistics()
    {
        $query = request()->param(); //请求参数
        // order_sn//订单编号
        $apidb = [
            'code' => 200,
            'time' => time(),
            'msg' => "订单物流信息",
            'query' => $query,
            'db' => [
                "list" => [
                    ["text" => "您的订单已签收，签收人（本人签收）。", "time" => "2021-09-22 19:24:21"],
                    ["text" => "订单正在派送中，请保持电话畅通，快递员（仰泳的鱼，电话 13960000001）。", "time" => "2021-09-22 19:24:21"],
                    ["text" => "快件到达某某营业点", "time" => "2021-09-22 19:24:21"],
                    ["text" => "快件在【某某中转场】完成分拣，准备发往【某某中专场】", "time" => "2021-09-22 19:24:21"],
                    ["text" => "快件在【某某营业点】完成分拣，准备发往【某某中转场】", "time" => "2021-09-22 19:24:21"],
                    ["text" => "顺丰快递已收取快件", "time" => "2021-09-22 19:24:21"]
                ],
                "info" => [["label" => "承运公司", "text" => "顺丰快递"], ["label" => "联系电话", "text" => "11183"], ["label" => "运单号", "text" => "SF999821983", "copy" => 1]]
            ],
        ];
        return json($apidb);
    }

    // 提交订单页面数据
    public function OrderNewReady()
    {
        $query = request()->param(); //请求参数
        // order_sn//订单编号
        $apidb = [
            'code' => 200,
            'time' => time(),
            'msg' => "提交订单页面数据",
            'query' => $query,
            'db' => [
                // 商品信息
                "goods" => [
                    "list" => [
                        ["cart_id" => null, "goods_id" => "333", "goods_sku_key" => "5df678749ca3de8ca781fb866a9974b5", "goods_number" => "1", "is_checked" => 1, "goods_name" => "333两件套套装裙连衣裙春季女装新款内搭套头针织衫毛衣中长款打底裙", "goods_image" => "https://img14.360buyimg.com/n1/s800x800_jfs/t1/139220/40/17156/149715/5fcd845dEd0b7fa22/d5d02cb4d8e3d134.jpg", "shop_price" => "88.00", "goods_sku_text" => "标准", "goods_price" => "88.00", "integral_discount" => 0, "profit" => 0, "integral" => 0],
                        ["cart_id" => null, "goods_id" => "33sdfs3", "goods_sku_key" => "5df678749ca3de8ca781fb866a9974b5", "goods_number" => "1", "is_checked" => 1, "goods_name" => "333两件套套装裙连衣裙春季女装新款内搭套头针织衫毛衣中长款打底裙", "goods_image" => "https://img14.360buyimg.com/n1/s800x800_jfs/t1/139220/40/17156/149715/5fcd845dEd0b7fa22/d5d02cb4d8e3d134.jpg", "shop_price" => "88.00", "goods_sku_text" => "标准", "goods_price" => "588.00", "integral_discount" => 0, "profit" => 0, "integral" => 0]
                    ]
                ],
                // 配送地址
                "address" => ["field" => ["id" => 139, "address_id" => "208723610882748418", "user_id" => "164904338662182914", "contact" => "d", "contact_number" => "13800138000", "gender" => 1, "province" => "120000", "city" => "", "district" => "", "street" => "", "address" => "ASd", "house_number" => "ads", "longitude" => "", "latitude" => "", "is_default" => 1, "status" => 1, "is_delete" => 0, "update_time" => "2021-07-29 23:13:06", "create_time" => "2021-07-29 23:13:06", "province_name" => "天津市", "city_name" => null, "district_name" => null, "street_name" => null, "full_address" => "天津市ASdads"], "form" => ["address_id" => "208723610882748418"], "show" => 0],
                // 优惠券
                "coupon" => [
                    "show" => 1,//显示模块可用
                    "form" => ["user_coupon_id" => "178996438662369282"],//优惠券弹窗默认选中的优惠券
                    "field" => ["text" => "无可用优惠券", "discount_amount" => 890,],//提交订单页面选中的优惠券显示
                    "list" => [
                        [
                            "coupon_name" => "优惠券-新年专享1",
                            "discount" => 30,
                            "minimum" => 99,
                            "coupon_desc" => "asd优惠券描述dasd",//优惠券描述
                            "use_scope" => 1,
                            "effective_start_time" => "2021-03-13 ",
                            "effective_end_time" => "2021-05-01 ",
                            "status" => 3,
                            "order_sn" => "",
                            "create_time" => "2021-05-08 22:27:56",
                            "use_time" => "0000-00-00 00:00:00",
                            "coupon_id" => "153902sf7330",
                            "user_coupon_id" => "178996438662369282",
                            "use_scope_text" => "全部商品可用",
                            "effective_time" => "全部商品可用",
                            "unusable_reason" => "sdffe无法使fds用的原因",//无法使用的原因
                            "is_used" => 0,
                            "is_expired" => 1
                        ],
                        [
                            "coupon_name" => "优惠券-新年专享2",
                            "discount" => 30,
                            "minimum" => 99,
                            "coupon_desc" => "ss优惠券描述sssssss",
                            "use_scope" => 1,
                            "effective_start_time" => "2021-03-13 ",
                            "effective_end_time" => "2021-05-01 ",
                            "status" => 3,
                            "order_sn" => "",
                            "create_time" => "2021-07-29 23:08:42",
                            "use_time" => "0000-00-00 00:00:00",
                            "coupon_id" => "153902814624227330",
                            "user_coupon_id" => "208722503146352642",
                            "effective_time" => "全部商品可用",
                            "use_scope_text" => "全部商品可用",
                            "unusable_reason" => "无fds法使sdfa用的dsf原因",//无法使用的原因
                            "is_used" => 0,
                            "is_expired" => 1
                        ]
                    ],
                ],
                // 可用积分模块
                "integral" => ["field" => ["user" => 0, "note" => "暂无积分可用", "discount" => 0, "discount_amount" => 0, "integral" => 0], "switch" => ["disabled" => 1, "checked" => 0, "color" => "#f30"], "form" => ["integral" => 0], "show" => 1],
                // 商品总额模块
                "charges" => [["label" => "商品总额", "text" => 88], ["label" => "优惠券", "text" => "-¥0.00"], ["label" => "积分抵扣", "text" => "-¥0.00"]],
                // 时段模块
                "delivery_time" => ["show" => 1, "list" => [["label" => "今天09月21日", "list" => [[["value" => "2021-09-21 20:00:00", "label" => "20:00"], ["value" => "2021-09-21 20:30:00", "label" => "20:30"]], [["value" => "2021-09-21 20:30:00", "label" => "20:30"], ["value" => "2021-09-21 21:00:00", "label" => "21:00"]], [["value" => "2021-09-21 21:00:00", "label" => "21:00"], ["value" => "2021-09-21 21:30:00", "label" => "21:30"]]]], ["label" => "明天09月22日", "list" => [[["value" => "2021-09-22 08:00:00", "label" => "08:00"], ["value" => "2021-09-22 08:30:00", "label" => "08:30"]], [["value" => "2021-09-22 08:30:00", "label" => "08:30"], ["value" => "2021-09-22 09:00:00", "label" => "09:00"]], [["value" => "2021-09-22 09:00:00", "label" => "09:00"], ["value" => "2021-09-22 09:30:00", "label" => "09:30"]], [["value" => "2021-09-22 09:30:00", "label" => "09:30"], ["value" => "2021-09-22 10:00:00", "label" => "10:00"]], [["value" => "2021-09-22 10:00:00", "label" => "10:00"], ["value" => "2021-09-22 10:30:00", "label" => "10:30"]], [["value" => "2021-09-22 10:30:00", "label" => "10:30"], ["value" => "2021-09-22 11:00:00", "label" => "11:00"]], [["value" => "2021-09-22 11:00:00", "label" => "11:00"], ["value" => "2021-09-22 11:30:00", "label" => "11:30"]], [["value" => "2021-09-22 11:30:00", "label" => "11:30"], ["value" => "2021-09-22 12:00:00", "label" => "12:00"]], [["value" => "2021-09-22 12:00:00", "label" => "12:00"], ["value" => "2021-09-22 12:30:00", "label" => "12:30"]], [["value" => "2021-09-22 12:30:00", "label" => "12:30"], ["value" => "2021-09-22 13:00:00", "label" => "13:00"]], [["value" => "2021-09-22 13:00:00", "label" => "13:00"], ["value" => "2021-09-22 13:30:00", "label" => "13:30"]], [["value" => "2021-09-22 13:30:00", "label" => "13:30"], ["value" => "2021-09-22 14:00:00", "label" => "14:00"]], [["value" => "2021-09-22 14:00:00", "label" => "14:00"], ["value" => "2021-09-22 14:30:00", "label" => "14:30"]], [["value" => "2021-09-22 14:30:00", "label" => "14:30"], ["value" => "2021-09-22 15:00:00", "label" => "15:00"]], [["value" => "2021-09-22 15:00:00", "label" => "15:00"], ["value" => "2021-09-22 15:30:00", "label" => "15:30"]], [["value" => "2021-09-22 15:30:00", "label" => "15:30"], ["value" => "2021-09-22 16:00:00", "label" => "16:00"]], [["value" => "2021-09-22 16:00:00", "label" => "16:00"], ["value" => "2021-09-22 16:30:00", "label" => "16:30"]], [["value" => "2021-09-22 16:30:00", "label" => "16:30"], ["value" => "2021-09-22 17:00:00", "label" => "17:00"]], [["value" => "2021-09-22 17:00:00", "label" => "17:00"], ["value" => "2021-09-22 17:30:00", "label" => "17:30"]], [["value" => "2021-09-22 17:30:00", "label" => "17:30"], ["value" => "2021-09-22 18:00:00", "label" => "18:00"]], [["value" => "2021-09-22 18:00:00", "label" => "18:00"], ["value" => "2021-09-22 18:30:00", "label" => "18:30"]], [["value" => "2021-09-22 18:30:00", "label" => "18:30"], ["value" => "2021-09-22 19:00:00", "label" => "19:00"]], [["value" => "2021-09-22 19:00:00", "label" => "19:00"], ["value" => "2021-09-22 19:30:00", "label" => "19:30"]], [["value" => "2021-09-22 19:30:00", "label" => "19:30"], ["value" => "2021-09-22 20:00:00", "label" => "20:00"]], [["value" => "2021-09-22 20:00:00", "label" => "20:00"], ["value" => "2021-09-22 20:30:00", "label" => "20:30"]], [["value" => "2021-09-22 20:30:00", "label" => "20:30"], ["value" => "2021-09-22 21:00:00", "label" => "21:00"]], [["value" => "2021-09-22 21:00:00", "label" => "21:00"], ["value" => "2021-09-22 21:30:00", "label" => "21:30"]]]], ["label" => "后天09月23日", "list" => [[["value" => "2021-09-23 08:00:00", "label" => "08:00"], ["value" => "2021-09-23 08:30:00", "label" => "08:30"]], [["value" => "2021-09-23 08:30:00", "label" => "08:30"], ["value" => "2021-09-23 09:00:00", "label" => "09:00"]], [["value" => "2021-09-23 09:00:00", "label" => "09:00"], ["value" => "2021-09-23 09:30:00", "label" => "09:30"]], [["value" => "2021-09-23 09:30:00", "label" => "09:30"], ["value" => "2021-09-23 10:00:00", "label" => "10:00"]], [["value" => "2021-09-23 10:00:00", "label" => "10:00"], ["value" => "2021-09-23 10:30:00", "label" => "10:30"]], [["value" => "2021-09-23 10:30:00", "label" => "10:30"], ["value" => "2021-09-23 11:00:00", "label" => "11:00"]], [["value" => "2021-09-23 11:00:00", "label" => "11:00"], ["value" => "2021-09-23 11:30:00", "label" => "11:30"]], [["value" => "2021-09-23 11:30:00", "label" => "11:30"], ["value" => "2021-09-23 12:00:00", "label" => "12:00"]], [["value" => "2021-09-23 12:00:00", "label" => "12:00"], ["value" => "2021-09-23 12:30:00", "label" => "12:30"]], [["value" => "2021-09-23 12:30:00", "label" => "12:30"], ["value" => "2021-09-23 13:00:00", "label" => "13:00"]], [["value" => "2021-09-23 13:00:00", "label" => "13:00"], ["value" => "2021-09-23 13:30:00", "label" => "13:30"]], [["value" => "2021-09-23 13:30:00", "label" => "13:30"], ["value" => "2021-09-23 14:00:00", "label" => "14:00"]], [["value" => "2021-09-23 14:00:00", "label" => "14:00"], ["value" => "2021-09-23 14:30:00", "label" => "14:30"]], [["value" => "2021-09-23 14:30:00", "label" => "14:30"], ["value" => "2021-09-23 15:00:00", "label" => "15:00"]], [["value" => "2021-09-23 15:00:00", "label" => "15:00"], ["value" => "2021-09-23 15:30:00", "label" => "15:30"]], [["value" => "2021-09-23 15:30:00", "label" => "15:30"], ["value" => "2021-09-23 16:00:00", "label" => "16:00"]], [["value" => "2021-09-23 16:00:00", "label" => "16:00"], ["value" => "2021-09-23 16:30:00", "label" => "16:30"]], [["value" => "2021-09-23 16:30:00", "label" => "16:30"], ["value" => "2021-09-23 17:00:00", "label" => "17:00"]], [["value" => "2021-09-23 17:00:00", "label" => "17:00"], ["value" => "2021-09-23 17:30:00", "label" => "17:30"]], [["value" => "2021-09-23 17:30:00", "label" => "17:30"], ["value" => "2021-09-23 18:00:00", "label" => "18:00"]], [["value" => "2021-09-23 18:00:00", "label" => "18:00"], ["value" => "2021-09-23 18:30:00", "label" => "18:30"]], [["value" => "2021-09-23 18:30:00", "label" => "18:30"], ["value" => "2021-09-23 19:00:00", "label" => "19:00"]], [["value" => "2021-09-23 19:00:00", "label" => "19:00"], ["value" => "2021-09-23 19:30:00", "label" => "19:30"]], [["value" => "2021-09-23 19:30:00", "label" => "19:30"], ["value" => "2021-09-23 20:00:00", "label" => "20:00"]], [["value" => "2021-09-23 20:00:00", "label" => "20:00"], ["value" => "2021-09-23 20:30:00", "label" => "20:30"]], [["value" => "2021-09-23 20:30:00", "label" => "20:30"], ["value" => "2021-09-23 21:00:00", "label" => "21:00"]], [["value" => "2021-09-23 21:00:00", "label" => "21:00"], ["value" => "2021-09-23 21:30:00", "label" => "21:30"]]]]], "form" => ["delivery_time" => ""], "field" => ["text" => "尽快送达"]],
                "delivery_method" => ["" => []],
                "outlets" => [],
                // 提交按钮条
                "submit" => ["field" => ["submit" => false, "note" => "所在地区与销售商品不符", "text" => "", "order_amount" => 88, "integral" => 0], "style" => ["background" => "#d81e06"]]
            ],
        ];
        return json($apidb);
    }

    // 正式新增订单
    public function OrderNew()
    {
        $query = request()->param(); //请求参数
        // order_sn//订单编号
        //插入关联商品
        $order_goods = [
            "order_sn" => "",//归属订单
            "goods_id" => "",//关联商品
            "goods_price" => 5,//原销售单价
            "goods_number" => 5,//购买数量
            "goods_amount" => 55,//结算价格
            "integral" => 0,//积分
            "activity_price" => 0,//活动价格
            "discount_price" => 0,//优惠金额
            "is_comment" => 0,//评论 0 否 1 是
            "refund_status" => 0,//退款状态 1 退款中 2 已退款
            "is_release_stock" => 0,//释放库存 0 否 1 是
        ];
        $apidb = [
            'code' => 200,
            'time' => time(),
            'msg' => "正式新增订单",
            'query' => $query,
            'db' => [],
        ];
        return json($apidb);
    }







    // 新增订单前验证商品
    public function OrderNewVerify()
    {
        $query = request()->param(); //请求参数
        // order_sn//订单编号
        $apidb = [
            'code' => 200,
            'time' => time(),
            'msg' => "新增订单前验证商品:库存足够",
            'query' => $query,
            'db' => [],
        ];
        return json($apidb);
    }


    // 新增订单获取结算信息
    public function OrderNewSettlement()
    {
        $query = request()->param(); //请求参数
        // order_sn//订单编号
        $apidb = [
            'code' => 200,
            'time' => time(),
            'msg' => "新增订单获取结算信息",
            'query' => $query,
            'db' => [],
        ];
        return json($apidb);
    }


    // 取消订单
    public function Cancel()
    {
        $query = request()->param(); //请求参数
        // order_sn//订单编号
        $apidb = [
            'code' => 200,
            'time' => time(),
            'msg' => "取消订单",
            'query' => $query,
            'db' => [],
        ];
        return json($apidb);
    }

    // 删除订单
    public function delete()
    {
        $query = request()->param(); //请求参数
        // order_sn//订单编号
        $apidb = [
            'code' => 200,
            'time' => time(),
            'msg' => "删除订单",
            'query' => $query,
            'db' => [],
        ];
        return json($apidb);
    }

    //   申请退款
    public function refund()
    {
        $query = request()->param(); //请求参数
        // order_sn//订单编号
        $apidb = [
            'code' => 200,
            'time' => time(),
            'msg' => "申请退款",
            'query' => $query,
            'db' => [],
        ];
        return json($apidb);
    }

}
